]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lookingGlass: Avoid infinite animation time
authorAdel Gadllah <adel.gadllah@gmail.com>
Sun, 4 Aug 2013 11:51:06 +0000 (13:51 +0200)
committerAdel Gadllah <adel.gadllah@gmail.com>
Sun, 4 Aug 2013 11:51:06 +0000 (13:51 +0200)
Math.max(x / y, 0.5) will return infinite when y is 0. Fix that by using
Math.min() which was the actual intent of the patch.

js/ui/lookingGlass.js

index 30493124f3080730df425a1f35d68161b0939a63..268d45f5773e0aa8d764210a6c65bf42451f6b95 100644 (file)
@@ -1150,7 +1150,7 @@ const LookingGlass = new Lang.Class({
 
         Main.popModal(this._entry);
 
-        Tweener.addTween(this.actor, { time: Math.max(0.5 / St.get_slow_down_factor(), 0.5),
+        Tweener.addTween(this.actor, { time: Math.min(0.5 / St.get_slow_down_factor(), 0.5),
                                        transition: 'easeOutQuad',
                                        y: this._hiddenY,
                                        onComplete: Lang.bind(this, function () {